package com.atguigu.chapter05;

import com.atguigu.chapter02.Event;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

public class ShuffleTest {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        env.setParallelism(2);


        DataStreamSource<Event> stream = env.addSource(new Clicksource());

        stream.rebalance().print("shuffle").setParallelism(4);


        env.execute();
    }
}
